Note: This functionality is only available for GaiaXPy 2.0.0 or later.
The Spanish Virtual Observatory SVO provides additional photometric systems for GaiaXPy that can be downloaded from their webpage. Instructions on how to download these additional files can be found here.
These files can be loaded into GaiaXPy and can be used to generate synthetic photometry in the same way it is done with GaiaXPy built-in photometric systems. The additional systems can be recognised by the prefix USER in their names.
# Import the necessary elements
from gaiaxpy import PhotometricSystem, load_additional_systems
The PhotometricSystem object contains the built-in GaiaXPy systems. They available systems can be consulted in the following way:
PhotometricSystem.get_available_systems()
'DECam, Els_Custom_W09_S2, Euclid_VIS, Gaia_2, Gaia_DR3_Vega, Halpha_Custom_AB, H_Custom, Hipparcos_Tycho, HST_ACSWFC, HST_HUGS_Std, HST_WFC3UVIS, HST_WFPC2, IPHAS, JKC, JKC_Std, JPAS, JPLUS, JWST_NIRCAM, LSST, PanSTARRS1, PanSTARRS1_Std, Pristine, SDSS, SDSS_Std, Sky_Mapper, Stromgren, Stromgren_Std, WFIRST'
The additional systems will be loaded through the function load_additional_systems
. To load the systems there are two options: 1) passing a path to the folder where the systems are contained directly to the function or 2) calling the function with no arguments and passing the path when prompted.
The input directory can contain nested files (files that are inside other folders in the directory). GaiaXPy will look for system files recursively in the given path.
Note: If some filters in the directory do not correspond to systems files, the program will show a warning and will then ignore these files.
Note: If two systems with the same name were found in the given directory and error will be raised an no systems will be loaded.
PhotometricSystem = load_additional_systems('/path/to/additional_filters_directory')
Loading systems... Additional systems version is: v1. Systems loaded. Use PhotometricSystem.get_available_systems() to get the names of the current available systems.
We can see which systems are available now by running get_available_systems
again. The additional systems will include the prefix USER
.
PhotometricSystem.get_available_systems()
'DECam, Els_Custom_W09_S2, Euclid_VIS, Gaia_2, Gaia_DR3_Vega, Halpha_Custom_AB, H_Custom, Hipparcos_Tycho, HST_ACSWFC, HST_HUGS_Std, HST_WFC3UVIS, HST_WFPC2, IPHAS, JKC, JKC_Std, JPAS, JPLUS, JWST_NIRCAM, LSST, PanSTARRS1, PanSTARRS1_Std, Pristine, SDSS, SDSS_Std, Sky_Mapper, Stromgren, Stromgren_Std, WFIRST, USER_PS1, USER_Sdss, USER_Pristine'
We can now use GaiaXPy as usual. We use both built-in systems and additional systems when calling generate
.
from gaiaxpy import generate
phot_systems_list = [PhotometricSystem.Pristine, PhotometricSystem.USER_PS1]
# File with input data
f = '/path/to/XP_CONTINUOUS_RAW.ecsv'
synthetic_photometry = generate(f, photometric_system=phot_systems_list)
synthetic_photometry
0/2 [00:00<?, ?syst/s]
source_id | Pristine_mag_CaHK | Pristine_flux_CaHK | Pristine_flux_error_CaHK | USER_PS1_mag_gp | USER_PS1_mag_rp | USER_PS1_mag_ip | USER_PS1_mag_zp | USER_PS1_mag_yp | USER_PS1_flux_gp | USER_PS1_flux_rp | USER_PS1_flux_ip | USER_PS1_flux_zp | USER_PS1_flux_yp | USER_PS1_flux_error_gp | USER_PS1_flux_error_rp | USER_PS1_flux_error_ip | USER_PS1_flux_error_zp | USER_PS1_flux_error_yp | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 5853498713190525696 | 13.818329 | 2.162462e-16 | 9.483388e-18 | 11.780413 | 10.389665 | 8.267455 | 7.297796 | 6.777229 | 7.118602e-28 | 2.535210e-27 | 1.792660e-26 | 4.404755e-26 | 7.108670e-26 | 1.085583e-30 | 3.705251e-30 | 1.717781e-29 | 2.317645e-29 | 5.758484e-29 |
1 | 5762406957886626816 | 13.016468 | 4.525774e-16 | 4.957204e-18 | 13.007401 | 13.381032 | 13.725244 | 13.994406 | 14.173418 | 2.299322e-28 | 1.612379e-28 | 1.175933e-28 | 9.231616e-29 | 7.821908e-29 | 1.363256e-31 | 1.320526e-31 | 8.630980e-32 | 1.100208e-31 | 2.481728e-31 |
If we load systems from a different directory, the current additional systems will be removed and replaced by these new ones:
PhotometricSystem = load_additional_systems()
A path for additional filters has already been defined. The current path is /path/to/additional_filters Do you want to redefine the path? [[y]/n]: Please enter the path to the systems directory: /path/to/svo_systems Loading systems... Additional systems version is: v1. Systems loaded. Use PhotometricSystem.get_available_systems() to get the names of the current available systems.
We can consult the systems again:
PhotometricSystem.get_available_systems()
'DECam, Els_Custom_W09_S2, Euclid_VIS, Gaia_2, Gaia_DR3_Vega, Halpha_Custom_AB, H_Custom, Hipparcos_Tycho, HST_ACSWFC, HST_HUGS_Std, HST_WFC3UVIS, HST_WFPC2, IPHAS, JKC, JKC_Std, JPAS, JPLUS, JWST_NIRCAM, LSST, PanSTARRS1, PanSTARRS1_Std, Pristine, SDSS, SDSS_Std, Sky_Mapper, Stromgren, Stromgren_Std, WFIRST, USER_AAO, USER_GSC2, USER_SDSS, USER_UCO, USER_York, USER_Narrow, USER_Hodge, USER_Broad, USER_Gunn, USER_ARCTIC, USER_MSSSO, USER_FNAL, USER_NMSU'
Some new versions of these systems will be published in the future. It is important, therefore, when publishing results for which the one or more additional systems were used to include the version of these systems.
The version can be consulted by calling get_version
over a photometric system.
PhotometricSystem.USER_MSSSO.get_version()
'v1'
If the same function is run over a built-in system, the current version of GaiaXPy will be returned:
PhotometricSystem.SDSS.get_version()
'2.0.0'
The additional systems will be automatically removed after the program exits. For example, when a script finishes running or when a Python interactive shell is closed. However, the systems can be manually removed as well, just in case the user considers it necessary. To remove the systems:
from gaiaxpy import remove_additional_systems
PhotometricSystem = remove_additional_systems()
Additional systems configuration successfully removed.
The additional systems will not appear when the get_available_systems
is called over the PhotometricSystem object.
PhotometricSystem.get_available_systems()
'DECam, Els_Custom_W09_S2, Euclid_VIS, Gaia_2, Gaia_DR3_Vega, Halpha_Custom_AB, H_Custom, Hipparcos_Tycho, HST_ACSWFC, HST_HUGS_Std, HST_WFC3UVIS, HST_WFPC2, IPHAS, JKC, JKC_Std, JPAS, JPLUS, JWST_NIRCAM, LSST, PanSTARRS1, PanSTARRS1_Std, Pristine, SDSS, SDSS_Std, Sky_Mapper, Stromgren, Stromgren_Std, WFIRST'